/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cc.altius.model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author sagar
 */
@Entity
@Table(name = "specialist_type")
@NamedQueries({
    @NamedQuery(name = "SpecialistType.findAll", query = "SELECT s FROM SpecialistType s"),
    @NamedQuery(name = "SpecialistType.findBySpecialistTypeId", query = "SELECT s FROM SpecialistType s WHERE s.specialistTypeId = :specialistTypeId"),
    @NamedQuery(name = "SpecialistType.findBySpecialistTypeCode", query = "SELECT s FROM SpecialistType s WHERE s.specialistTypeCode = :specialistTypeCode"),
    @NamedQuery(name = "SpecialistType.findBySpecialistType", query = "SELECT s FROM SpecialistType s WHERE s.specialistType = :specialistType")})
public class SpecialistType implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "SPECIALIST_TYPE_ID")
    private Integer specialistTypeId;
    @Column(name = "SPECIALIST_TYPE_CODE")
    private String specialistTypeCode;
    @Column(name = "SPECIALIST_TYPE")
    private String specialistType;
//    @OneToMany(mappedBy = "specialistTypeId")
//    private List<Specialist> specialistList;

    public SpecialistType() {
    }

    public SpecialistType(Integer specialistTypeId) {
        this.specialistTypeId = specialistTypeId;
    }

    public Integer getSpecialistTypeId() {
        return specialistTypeId;
    }

    public void setSpecialistTypeId(Integer specialistTypeId) {
        this.specialistTypeId = specialistTypeId;
    }

    public String getSpecialistTypeCode() {
        return specialistTypeCode;
    }

    public void setSpecialistTypeCode(String specialistTypeCode) {
        this.specialistTypeCode = specialistTypeCode;
    }

    public String getSpecialistType() {
        return specialistType;
    }

    public void setSpecialistType(String specialistType) {
        this.specialistType = specialistType;
    }

//    public List<Specialist> getSpecialistList() {
//        return specialistList;
//    }
//
//    public void setSpecialistList(List<Specialist> specialistList) {
//        this.specialistList = specialistList;
//    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (specialistTypeId != null ? specialistTypeId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SpecialistType)) {
            return false;
        }
        SpecialistType other = (SpecialistType) object;
        if ((this.specialistTypeId == null && other.specialistTypeId != null) || (this.specialistTypeId != null && !this.specialistTypeId.equals(other.specialistTypeId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cc.altius.model.SpecialistType[ specialistTypeId=" + specialistTypeId + " ]";
    }
    
}
